<!DOCTYPE html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Kettle管理-登录</title>
    <link href="/ui/login/styles.css" rel="stylesheet" />
    <link href="/ui/login/jquery-ui-1.8.16.custom.css" rel="stylesheet">
    <script src="/ui/js/jquery.min.js"></script>
    <script src="/ui/login/jquery-ui-1.8.16.custom.min.js"></script>
</head>
<script type="text/javascript">

	function getURL(url) {
		var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	
		xmlhttp.open("GET", url, false);
		xmlhttp.send();
		if (xmlhttp.readyState == 4) {
			if (xmlhttp.Status != 200)
				alert("不存在");
			return xmlhttp.Status == 200;
		}
		return false;
	}
	
// 	getURL("/ui/js/jquery.min.js");

	// 禁止登录页内嵌
	if (window != top){
		parent.location.href = location.href; 
	}
	
	var UA = navigator.userAgent.toLowerCase();
    var browerKernel = {
        isWebkit: function() {
            if (/webkit/i.test(UA)) return true;
            else return false;
        },
	    isFirefox: function() {
            if (/firefox/i.test(UA)) return true;
            else return false;
		}
    }

	if(!browerKernel.isWebkit()){
		alert("您当前浏览器无法兼容本系统！\n推荐使用Google Chrome 浏览器！\n\n其它兼容浏览器：\n360浏览器极速模式\n搜狗高速浏览器3\n世界之窗极速版\n猎豹浏览器\nQQ浏览器\n其它浏览器请自测");
	}
	
	$(function() {
		$('form :input:first').focus();
		$('form :input').keyup(function(event) {
			if (event.keyCode == 13) {
				$('#loginForm').submit();
			}
		});
	});
	
</script>
<body id="login">
    <div id="wrappertop">
    </div>
    <div id="wrapper">
        <div id="content">
            <div id="header">
				<img src="/ui/images/logo.png" alt="EOVA">
            </div>
            <div id="darkbanner" class="banner320">
                <h2 style='font-family: "Microsoft YaHei"'>运营支撑系统 ┇ USER LOGIN</h2>
            </div>
            <div id="darkbannerwrap">
            </div>
            <form id="loginForm" method="post" action="/doLogin">
            	<fieldset class="form">
					<p>
						<label class="loginlabel" for="user_name"> 帐号:</label> <input
							class="logininput ui-keyboard-input ui-widget-content ui-corner-all"
							name="loginId" id="user_name" type="text"
							value="${login_id!''}" />
					</p>
					<p>
						<label class="loginlabel" for="user_password"> 密码:</label> <span>
							<input class="logininput ui-keyboard-input ui-widget-content ui-corner-all" name="loginPwd"
							value="${login_pwd!''}" id="user_password" type="password" />
						</span>
					</p>
					<div style="text-align: left; margin-left: 80px; margin-bottom: 5px; color: #BE1302;">
						<b>${msg!}<b>
					</div>
					<div>
					<button id="loginbtn" type="button" class="positive" name="Submit">
                    <img src="/ui/login/key.png" />快速登录</button>
				</div>
            </fieldset>
        </div>
    </div>
    <div id="wrapperbottom_branding">
        <div id="wrapperbottom_branding_text">
            Powered by <b><a href="http://www.eova.cn" target="dialog">EOVA</a></b> V1.5
		</div>
    </div>
    <script type="text/javascript">
        $(document).ready(function() {
            $(".logininput").blur(function() {
                if ($(this).val() == "") {
                    $(this).css("border-color", "red");
                } else {
                    $(this).css("border-color", "#D9D6C4");
                }
            })

            $("#loginbtn").click(function() {
                var k = 0;
                var ajaxhtml = "";
                $(".logininput").each(function(i, obj) {
                    if ($(obj).val().trim() == "") {
                        k++;
                        $(this).css("border-color", "red");
                        $(this).focus();
                        return false;
                    }
                });
                if (k != 0) return;
                ajaxhtml = $("#loginbtn").html();
                $("#loginbtn").html("Loading....");
                $("#loginbtn").attr("disabled", "disabled");
				$("#loginForm").submit();
            })
        });
</script>
</body>
</html>
